import request from "@/utils/request";

export function fetchList(params) {
  return request({
    url: "/admin/list",
    method: "get",
    params
  });
}
export function setStatus(id) {
  return request({
    url: "/admin/setStatus",
    method: "post",
    data: {
      id: id
    }
  });
}

export function fetchDetail(id) {
  return request({
    url: "/admin/detail",
    method: "get",
    params: {
      id: id
    }
  });
}

export function store(data) {
  return request({
    url: "/admin/store",
    method: "post",
    data
  });
}

export function save(data) {
  return request({
    url: "/admin/save",
    method: "post",
    data
  });
}
